import os

import requests
from time import time

import numpy as np

url = 'http://139.199.34.94:8501/v1/models/half_plus:predict'

a = np.array([1,2 ,3,4])

predict_request = '{"inputs":{"input_x": [[2,4]],"input_y": [[3,6]]}}'  # 一定要list才能传输，不然json错误


print("start")
start_time = time()
r = requests.post(url,data=predict_request)
print(str(r.content))
end_time = time()